package com.dao;

import com.alibaba.fastjson.JSONObject;

public class NodeFactory {
    public static JSONObject newRoot(){
        JSONObject result=new JSONObject();
        result.put("children",new JSONObject());
        return result;
    }
    public static JSONObject newView(String name){
        JSONObject result=new JSONObject();
        result.put("type","view");
        result.put("name",name);
        return result;
    }
    public static JSONObject newFolder(String name){
        JSONObject result=new JSONObject();
        result.put("type","folder");
        result.put("name",name);
        return result;
    }
    public static JSONObject newFile(String name){
        JSONObject result=new JSONObject();
        result.put("type","file");
        result.put("name",name);
        return result;
    }
}
